package com.flycms.module.qasystem.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import com.flycms.module.comment.model.Comments;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 回答类
 *
 * <br/>Copyright 2020
 * <br/>All rights reserved
 * @author 沁言訫語
 * @version 2020年2月17日
 * @Date 2020年2月17日
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Answers implements Serializable {

    private static final long serialVersionUID = 1L;
    
    private Long id;
    
    //答题人ID
    private Long replyUserId;
    
    private String userName;
    
    //用户头像
    private String avatar;
    
    //回答的问题的ID
    @Min(value = 0, message = "回答的问题ID必须大于0")
    private Long questionId;
    
    private String questionTitle;
    
    @NotBlank(message = "答案内容不能为空")
    private String content;
    
    //点赞数
    private Integer upCount;
    
    //点踩数
    private Integer downCount;
    
    private Integer commentCount;
    
    //收藏数
    private Integer collectCount;
    
    private Date createTime;
    
    //开启、关闭、锁定、删除、待审核 1、2、3、0、4
    private Integer status;
    
    //审核意见
    @Size(max = 200, message = "审计意见不能超过200")
    private String opinion;
    
    //最后操作的人的ID
    private Long updateUserId;
    
    private Date updateTime;
    
    private List<Comments> comments;
    
}
